package com.seele.tigerwallet.api;

public class APIException extends Throwable {

    public int code;

    public String message;

    // 正确返回0，
    //-101	服务器内部错误
    //-102	参数错误
    //-103 	其它未定义错误
    //-104	非法渠道
    //-105	请求频繁
    //-106	session失效
    //-107 token 失效
    //-108 账号已经注册
    //-109 登录失败
    //-110 重复请求或者重复数据数据错误
    //-111 接口更新,版本需要升级
    //-112 未注册
    public static int SERVER_INTERNAL_ERROR = -101;
    public static int PARAMETER_ERROR = -102;
    public static int UNKNOWN_ERROR = -103;
    public static int ILLEGAL_CHANNEL_ERROR = -104;
    public static int FREQUENT_REQUESTS_ERROR = -105;
    public static int SESSION_INVALID_ERROR = -106;
    public static int ERROR_109 = -109;//登录失败
    public static int ERROR_112 = -112;//未注册

    public static int ERROR_110 = -110;
    public static int GSONERROR = -1008;//Gson解析错误

    public APIException() {
        super();
    }


    public APIException(String message) {
        super(message);
    }

    public APIException(int code) {
        this.code = code;

    }

    public APIException(int code, String message) {
        this.code = code;
        this.message = message;

    }
}
